language: php

php:
  - 5.2
  - 5.3
  - 5.4
  - 5.5
  - 5.6
  - hhvm

env:
  - TWIG_EXT=no
  - TWIG_EXT=yes

before_script:
  - if [ "$TWIG_EXT" == "yes" ]; then sh -c "cd ext/twig && phpize && ./configure --enable-twig && make && sudo make install"; fi
  - if [ "$TWIG_EXT" == "yes" ]; then echo "extension=twig.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`; fi

matrix:
  exclude:
    - php: hhvm
      env: TWIG_EXT=yes
